package com.example.duanlei417.mypro2.andoridp;

import android.app.Activity;
import android.util.DisplayMetrics;

public class Utils {


    public static int getScreenWidth(Activity activity) {
        DisplayMetrics dm = new DisplayMetrics();
        activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
        return dm.widthPixels;
    }
}
